package com.peng.mvvm_wan.beans

data class LoginBean(
    var admin: Boolean? = false,
    var chapterTops: Array<String>? = null,
    var collectIds: Array<Int>? = null,
    var email: String? = null,
    var icon: String? = null,
    var nickname: String? = null,
    var password: String? = null,
    var publicName: String? = null,
    var token: String? = null,
    var username: String? = null,
    var id: Int = 0,
    var type: Int = 0

) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as LoginBean

        if (token != other.token) return false
        if (username != other.username) return false
        if (id != other.id) return false
        if (type != other.type) return false

        return true
    }

    override fun hashCode(): Int {
        var result = token?.hashCode() ?: 0
        result = 31 * result + (username?.hashCode() ?: 0)
        result = 31 * result + id
        result = 31 * result + type
        return result
    }

}